const { defineConfig } = require('@vue/cli-service');
const { getThemeVariables } = require('ant-design-vue/dist/theme');
const lessVars = require('./src/styles/var.ts');
module.exports = defineConfig({
  publicPath: './',
  outputDir: process.env.VUE_APP_FILE_Name,
  assetsDir: 'static',
  transpileDependencies: true,
  css: {
    loaderOptions: {
      css: {
        modules: {
          auto: true,
          localIdentName: '[name]_[local]__[hash:base64]',
        }
      },
      less: {
        lessOptions: {
          modifyVars: {
            ...getThemeVariables(),
            ...lessVars
          },
          javascriptEnabled: true
        },
        additionalData: `@import "@/styles/index.less";`,
      },
    },
  },
  devServer: {
    port: 9595,
    client: {
      overlay: {
        runtimeErrors: false,
      },
    },
  },
  configureWebpack: {
    name: '中联e保',
  },
})
